home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj1086.arc
/
READDIR1.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-08-13
|
1KB
|
47 lines
;LISTING 1: READDIR1.ASM
;
; This program reads the directory from the diskette in drive A
; into the memory area at DIRECTORY_BUFFER. For the sake of
; simplicity no console input or output functions are performed
; by this program.
;
CODESEG SEGMENT PARA PUBLIC 'CODE'
;
ASSUME CS:CODESEG,DS:CODESEG,ES:CODESEG,SS:CODESEG
;
ORG 0100H
;
BEGIN: JMP READ_DIRECTORY
;
; ************************ Data Definitions **************************
;
DIRECTORY_BUFFER DB 3584 DUP (?)
;
; ************************ Main Procedure **************************
;
READ_DIRECTORY:
;
; Setup the registers for absolute disk read
;
MOV AL,00H ; Drive A
MOV BX,OFFSET DIRECTORY_BUFFER ; Point to the beginning
; of the memory area
MOV CX,0007H ; 7 Sectors to be read
MOV DX,0005H ; Start at sector 5
INT 25H ; Absolute Disk Read Interrupt
JC ERROR_EXIT ; Quit if there was an error
POPF ; Restore the user flags
RET ; Return to DOS
;
; Error return point -- error fixup or messages can go here
;
ERROR_EXIT:
POP DI ; Throw away the user flags
RET ; Return to DOS
;
CODESEG ENDS
;
; ********************************************************************
;
END BEGIN